#include <stdio.h>

int main()
{
int n = 0;
scanf("%d",&n);
if(n%3 == 0||n%5 == 0||n%7 == 0)
{
	if(n%3 == 0)
	{
		printf("3 ");
		if(n%5 == 0)
		{
			printf("5 ");
			if(n%7 == 0)
			 printf("7");
		}
	}
	 
	else if(n%5 == 0)
	{
		printf("5 ");
		if(n%7 == 0)
		    printf("7");
	
	}     
	else
	 printf("7"); 
}
else
 printf("n");
 
 return 0;
} 
